package com.ctrlspace.api;

import java.util.Map;

import com.ctrlspace.model.FileUnit;
import com.ctrlspace.model.ProjectUnit;

public interface IProjectNature extends IPlugin {
	ProjectUnit getProject(ProjectUnit projectUnit) throws Exception;

	ProjectUnit openProject(ProjectUnit projectUnit) throws Exception;

	ProjectUnit closeProject(ProjectUnit projectUnit) throws Exception;

	ProjectUnit createProject(ProjectUnit projectUnit, Map<?, ?> options) throws Exception;

	void addFolder(ProjectUnit projectUnit, String folderName, String path);

	void addFile(ProjectUnit projectUnit, String fileName, String path) throws Exception;

	void addClass(ProjectUnit projectUnit, String className, String packageName) throws Exception;

	void addInterface(ProjectUnit projectUnit, String interfaceName, String packageName) throws Exception;

	void addEnum(ProjectUnit projectUnit, String className, String packageName) throws Exception;

	FileUnit openFile(ProjectUnit projectUnit, String path) throws Exception;

	FileUnit saveFile(ProjectUnit projectUnit, String filePath, String contents) throws Exception;
	
	Process run(ProjectUnit projectUnit, int port) throws Exception;
	
	void deploy(ProjectUnit projectUnit, String email, String password, String applicationId, String proxy) throws Exception;
	
	class StreamGobler extends Thread{};
	}